//
//  NoteRespository.swift
//  MyNoteDemo4
//
//  Created by BZF on 2020/8/24.
//  Copyright © 2020 bzf. All rights reserved.
//

import Foundation
import Alamofire

public class NoteRespository {

    private let mRemote = NoteRemote()
    
    public static let instance: NoteRespository = {
            let instance = NoteRespository()
        return instance
    }()
    
    public func insertData(_ mode: Note, handler: @escaping (AFDataResponse<Any>) -> Void){
        mRemote.insert(mode, handler: handler)
    }
    
    public func getAll(handler: @escaping (AFDataResponse<Any>) -> Void) {
        mRemote.getAll(handler: handler)
    }
    
}
